﻿




-- 撤销卡
create procedure [dbo].[RyCaInfo_CancelCard]
@lsh bigint=null
as
if(@lsh is null)
begin
update RyCa_Info set cxsj=getdate() from
(
	select sfzh,kh from RyCa_Info where cxsj is null
	except 
	select sfzh,kh from JsdRyqx_Info
) aa 
where cxsj is null and (RyCa_Info.sfzh=aa.sfzh and RyCa_Info.kh=aa.kh)
end
else
begin
update RyCa_Info set cxsj=getdate() where lsh=@lsh and cxsj is null
end